Origins of poor code readability

نویسنده

  • Arun Saha
چکیده

The topic of source code readability has paramount importance in software engineering. Literature exists on how to write readable code; how to create analytical models and automatically predict readability; and how readability influences software cost and eventually the economy. In this article we follow a different path; we explore the question of why and how unreadable code gets written. Motivation The software community is increasingly concerned about the code readability (Buse et al. 2010): The readability of source code is related to its maintainability, and is thus a key factor in overall software quality. Typically, maintenance consumes over 70% of the total lifecycle cost of a software product (Boehm 2001). Aggarwal claims that source code readability and documentation readability are both critical to the maintainability of a project. Other researchers have noted that the act of reading code is the most time-consuming component of all maintenance activities. Readability is so significant, in fact, that Elshoff and Marcotty, after recognizing that many commercial programs were much more difficult to read than necessary, proposed adding a development phase in which the program is made more readable. Knight and Myers suggested that one phase of software inspection should be a check of the source code for readability to ensure maintainability, portability, and reusability of the code. Readability is a human judgment of how easy it is to understand program source code. It is important to note that readability is unrelated to functionality; the readability of source code can be increased or decreased without affecting program correctness. Unlike some other aspects which have objective definitions readability is always subjective. As the proverb goes, “Beauty is in the eye of the beholder;” readability is very much a human construct. What constitutes readable code may differ from programmer to programmer or from one group of programmers to another, or from programmers of one language to programmers of another language. We recognize this subjectivity on small snippets of code, but we believe that for relatively significant chunks of code (for example, a class definition and implementation), the human judgment generally reaches agreement. In this article, we first explore the various importance of readability. Later, we explore how and why readability gets compromised. 1 The opinions expressed in this article are solely the author’s – not his employer’s.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Study of Different Coding Styles Affecting Code Readability

During software programming, code readability is very important because it affects the understanding of the code context, facilitates communication and collaboration between team members, and it avoids problematic software maintenance. In this study, our research hypothesis was that the coding style affects the code readability. Developers who do not comply with coding conventions and guideline...

متن کامل

An assessment of the quality of information on stroke and speech and language difficulty web sites

Online healthcare information is used by patients, their carers and families (PCF) experiencing speech and language difficulties (SLD) after a stroke. This information may be of variable quality. Tools have been designed to assess the risk of poor information quality, evaluating both generic and specific concepts, yet none focus on stroke. The readability of information is also an issue when co...

متن کامل

An Integrated Approach for Measuring Software Quality and Code Readability

In this paper, we explore the concept of code readability and investigate its relation to software quality[1]. This is a new approach to measuring the complexity of software systems[2]. Software industry uses software metrics to measure the complexity of software systems for software cost estimation, software development control, software assurance, software testing, and software maintenance [3...

متن کامل

Simplified Readability Metrics

This paper describes a new approach to measuring the complexity of software systems with considering their readability. Readability Metrics were proposed by Chung and Yung [8] in 1990. Readability Metrics have been outstanding among the existing software complexity metrics for taking nonphysical software attributes, like readability, into considerations. The applications of Readability Metrics ...

متن کامل

A Novel Lightweight Virtual Machine Based Decompiler to Generate C/C++ Code with High Readability

As a key part of reverse engineering, decompilation plays a very important role in software security and maintenance. Many decompilation techniques and tools have been developed while all of them have defects in different aspects. For example, IDA Hex rays generates pseudocodes with poor readability, and Boomerang is unable to identify composite structures such as Classes and multidimensional a...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011